/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.techshop.service.impl;

import com.techshop.dao.CommentDao;
import com.techshop.model.Comment;
import com.techshop.service.CommentService;
import java.util.List;

/**
 *
 * @author hai
 */
public class CommentServiceImpl implements CommentService{
    private CommentDao commentDao;

    public CommentDao getCommentDao() {
        return commentDao;
    }

    public void setCommentDao(CommentDao commentDao) {
        this.commentDao = commentDao;
    }

    @Override
    public Comment getById(int commentId) {
       return this.getCommentDao().getById(commentId);
    }

    @Override
    public List<Comment> findAll() {
       return this.getCommentDao().findAll();
    }

    @Override
    public boolean insert(Comment comment) {
       return this.getCommentDao().insert(comment);
    }

    @Override
    public boolean update(Comment comment) {
        return this.getCommentDao().update(comment);
    }

    @Override
    public boolean delete(Comment comment) {
        return this.getCommentDao().delete(comment);
    }
    
}
